/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package model;

import java.io.IOException;
import org.kxml2.io.KXmlParser;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;

/**
 *
 * @author zimi
 */
public class Activity {

    private int order;

    private String step;
    public Activity(){
        
    }
    public Activity(String step) {
        this.step = step;
    }

    public Activity(KXmlParser parser) throws XmlPullParserException, IOException{
        while (parser.nextTag() != XmlPullParser.END_TAG) {
            parser.require(XmlPullParser.START_TAG, null, null);
            String tagName = parser.getName();
            if (tagName.equals("order")) {
                this.order = Integer.parseInt(parser.nextText());
            }
            if (tagName.equals("step")) {
                this.step = parser.nextText();
            }

            parser.require(XmlPullParser.END_TAG, null, null);
        }
    }

    public int getOrder() {
        return order;
    }

    public void setOrder(int order) {
        this.order = order;
    }

    public String getStep() {
        return step;
    }

    public void setStep(String step) {
        this.step = step;
    }

    public boolean hasTimer(){
        throw new RuntimeException("todo");
    }

    public int getTimerSeconds() {
        throw new RuntimeException("todo");
    }

}
